// 接口管理
import { get, post } from "./http"

// 登录
const userlogin = (params: object) => post("userlogin", params)

// 菜单管理
const menulist = () => get("menulist", { istree: 1 })
const menuaddedit = (url: any, data: any) => post(url, data)
const menudelete = (data: any) => post("menudelete", data)

// 管理员管理
const userlist = (data: any) => get("userlist", data)
const usercount = () => get("usercount")
const usereditadd = (url: any, data: any) => post(url, data)
const userdelete = (data: any) => post('userdelete', data)
// 角色管理
const rolelist = () => get("rolelist")



export default {
    userlogin, menulist, menuaddedit, menudelete, userlist, usercount, rolelist, usereditadd, userdelete
}